package cn.turboinfo.dongying.api.provider.common.repository.database.user;

import cn.turboinfo.dongying.api.entity.admin.enumeration.login.AdminLoginOperation;
import cn.turboinfo.dongying.api.provider.common.repository.database.SoftDeleteWithoutIdYCEntity;
import lombok.Getter;
import lombok.Setter;
import net.sunshow.toolkit.core.base.enums.EnableStatus;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Where;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Table(
        name = "sys_user"
)
@Entity
@Where(clause = "deleted = 0")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
public class SysUserPO extends SoftDeleteWithoutIdYCEntity {

    @Id
    private Long id;

    private String username;

    private String mobile;

    private EnableStatus status;

    /**
     * 登录后的操作
     */
    @Column(name = "login_operation")
    private AdminLoginOperation loginOperation;

}
